home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / envset10.zip / ENVSET.DOC < prev    next >
Text File  |  1989-08-25  |  4KB  |  108 lines

  1.  
  2.                             ENVSET.COM Documentation.
  3.  
  4.                                    Version 1.0
  5.                                    August, 1989
  6.  
  7.                                (c) 1989 John Sloan.
  8.                         (John Sloan, Compuserve 73727,2162)
  9.  
  10.  
  11.  
  12.  
  13. PURPOSE:
  14.   This utility is used in a batch file to set an environment variable
  15. to a value or create a new environment variable.
  16.  
  17.   An example would be if you had a replacement for the DOS "TYPE" command such
  18. as the "BROWSER" utility which did not prompt you for a filename if you
  19. just issued the command "BROWSER" but instead gave you a nasty error message.
  20. This utility can get around this by letting the batch file prompt you for a
  21. filename, as it does in the example below.
  22.  
  23. USAGE:
  24.   To use it, the batch file command is:
  25.  
  26.                "envset TEMP.BAT ENAME"
  27. where:
  28. -TEMP.BAT is the name of a temporary batch file which will contain
  29. the fully written command to set the environment variable.
  30. -ENAME is the environment variable you wish to use.
  31.  
  32. EXAMPLES:
  33.  
  34.   Listing of file browse.bat:
  35.  
  36. @echo off
  37. if not "%1" == "" goto name
  38. echo Please enter the filename to be browsed,
  39. echo and press "Enter":
  40. c:\tools\envset c:\temp01.bat tempname
  41. call c:\temp01.bat
  42. c:\utils\browser %tempname%
  43. set tempname=
  44. del c:\temp01.bat
  45. goto end
  46. :name
  47. c:\utils\browser %1
  48. :end
  49.  
  50. If a filename is entered at the command line after the command "BROWSE",
  51. then the utility BROWSER in directory c:\TOOLS is executed. If the command
  52. "BROWSE" is entered with no filename to be browsed, then ENVSET is run to
  53. ask for interactive input to get a filename to be browsed.
  54.  
  55. The utility ENVSET will ask for a filename to be entered, then set the
  56. environment variable "tempname" to that filename. It then runs the
  57. "BROWSER" utility with that filename as input and then gets rid of the
  58. extra TEMP.BAT file and the unnecessary environment variable TEMPNAME
  59. that we are finished using.
  60.  
  61. We have the "BROWSER" utility in C:\UTILS and envset utility in C:\TOOLS
  62. and we set up the temporary batch file TEMP99.BAT in the root directory.
  63.  
  64.  
  65.         Copyright/License/Warranty
  66.         --------------------------
  67.  
  68.         This document and the program file ENVSET.COM ("the software") are
  69.         copyrighted by the author.  The copyright owner hereby licenses
  70.         you to: use the software; make as many copies of the program and
  71.         documentation as you wish; give such copies to anyone; and
  72.         distribute the software and documentation via electronic means.
  73.         There is no charge for any of the above.
  74.  
  75.         However, you are specifically prohibited from charging, or
  76.         requesting donations, for any such copies, however made; and
  77.         from distributing the software and/or documentation with
  78.         commercial products without prior permission.  An exception is
  79.         granted to not-for-profit user's groups, which are authorized to
  80.         charge a small fee (not to exceed $7) for materials, handling,
  81.         postage, and general overhead.  NO FOR-PROFIT ORGANIZATION IS
  82.         AUTHORIZED TO CHARGE ANY AMOUNT FOR DISTRIBUTION OF COPIES OF
  83.         THE SOFTWARE OR DOCUMENTATION, OR TO INCLUDE COPIES OF THE
  84.         SOFTWARE OR DOCUMENTATION WITH SALES OF THEIR OWN PRODUCTS.
  85.  
  86.         THIS INCLUDES A SPECIFIC PROHIBITION AGAINST FOR-PROFIT
  87.         ORGANIZATIONS DISTRIBUTING THE SOFTWARE, EITHER ALONE OR WITH
  88.         OTHER SOFTWARE, AND CHARGING A "HANDLING" OR "MATERIALS" FEE OR
  89.         ANY OTHER SUCH FEE FOR THE DISTRIBUTION.  NO FOR-PROFIT
  90.         ORGANIZATION IS AUTHORIZED TO INCLUDE THE SOFTWARE ON ANY MEDIA
  91.         FOR WHICH MONEY IS CHARGED.
  92.  
  93.         There is no restriction on the use of this software in
  94.         commercial or institutional environments.
  95.  
  96.         No copy of the software may be distributed or given away without
  97.         this document; and this notice must not be removed.
  98.  
  99.         There is no warranty of any kind, and the copyright owner is not
  100.         liable for damages of any kind.  By using this free software,
  101.         you agree to this.
  102.  
  103.  
  104.  
  105.            First Edition (August 1989)
  106.  
  107.              (c) John Sloan 1989
  108.